<%@outputencoding="utf-8"%>
<%@inputencoding="utf-8"%>
<%@gobblews=yes%>
<%@pagetemplate="themes/k2/index.y"%>
<%@session=yes%>
<%@inherit=snakeserver.user.LoginPage%>
<%

# first, check if we have to log out.
if self.Request.getParameter("logout"):
    self.Request.deleteSession()
    self.User=None
else:
    self.attemptLogin("edit")       # call the base class, to attempt to log in 

# if we get here, the login failed.. (or we just logged out)
error=''
if self.Request.getParameter("login"):
    error='<div class="error"><img src="img/icons/exclamation.png" align=absmiddle>&nbsp;Invalid login</span>'

%>
<form method="POST" action="login">
<p>Access is allowed only for authorised users.
<input type="hidden" name="action" value="login">
<table class="login" border="0" summary="Login form">
<tr><td>Login name:</td><td><input id="loginfield" type="text" name="login"></td><td><%=error%></td></tr>
<tr><td>Password:</td><td><input type="password" name="password"></td><td><input type="submit" value="Login" name="submit"></td></tr>
</table>
</form>
